﻿using System.Collections.Generic;
using Newtonsoft.Json;

namespace Missbot.WeiboBot.Model
{
    /// <summary>
    /// 短博文响应体
    /// </summary>
    public class WeiboShortResp
    {
        /// <summary>
        /// MID
        /// </summary>
        [JsonProperty("mid")]
        public string MID { get; set; }
        
        /// <summary>
        /// 微博ID
        /// </summary>
        [JsonProperty("mblogid")]
        public string MBlogID { get; set; }
        
        /// <summary>
        /// 原始博文信息
        /// </summary>
        [JsonProperty("text_raw")]
        public string TextRaw { get; set; }
        
        /// <summary>
        /// 是否是长博文
        /// </summary>
        [JsonProperty("isLongText")]
        public bool IsLongText { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        [JsonProperty("created_at")]
        public string CreatedAt { get; set; }
        
        [JsonProperty("pic_infos")]
        public Dictionary<string, WeiboPicInfoModel> PicInfos { get; set; }
    }

    public class WeiboPicInfoModel
    {
        [JsonProperty("thumbnail")]
        public WeiboPicDetail ThumbNail { get; set; }
        
        [JsonProperty("bmiddle")]
        public WeiboPicDetail BMiddle { get; set; }
        
        [JsonProperty("large")]
        public WeiboPicDetail Large { get; set; }
        
        [JsonProperty("original")]
        public WeiboPicDetail Original { get; set; }
        
        [JsonProperty("largest")]
        public WeiboPicDetail Largest { get; set; }
        
        [JsonProperty("mw2000")]
        public WeiboPicDetail MW2000 { get; set; }
        
        [JsonProperty("pic_id")]
        public string PicID { get; set; }
        
        [JsonProperty("type")]
        public string Type { get; set; }
    }

    public class WeiboPicDetail
    {
        [JsonProperty("url")]
        public string Url { get; set; }
        
        [JsonProperty("width")]
        public string Width { get; set; }
        
        [JsonProperty("height")]
        public string Height { get; set; }
    }
}